package com.wyh.service.serviceImpl.appservieripml;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.wyh.domain.vo.gruopfour.customerVO.MyTicket;
import com.wyh.mapper.appmapper.MyTicketMapper;
import com.wyh.service.appservice.MyTicketService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class MyTicketServiceImpl implements MyTicketService {
    @Autowired
    private MyTicketMapper myTicketMapper;
    @Override
    public List<MyTicket> findInvoiceRecordsByCustomerId(int customerId, int type,Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        Page<MyTicket>  page= (Page<MyTicket>) myTicketMapper.getInvoiceRecordsByCustomerId(customerId,type);

        log.info("page:{}",page.getResult());
        return page.getResult();
    }
}
